<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
</head>
<body>
    <form action="#" method="put">
        <ul>
            <li><input type="text" name="username"></li>
            <li><input type="checkbox" name="fav" value="1"> linux</li>
            <li><input type="checkbox" name="fav" value="2"> python</li>
            <li><input type="checkbox" name="fav" value="3"> golang</li>
            <li><input type="submit" value="提交"></li>
        </ul>
    </form>
</body>
</html>
<script>

 $.ajax({
   url: "#",
   data: {"username": "rock", "fav":["1", "2"]},
   type: "test"
 });

</script>